<?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/pagination.css') ?>
<?php if ($this->pageCount): ?>
    <div class="pagination pagination-centered">
        <ul>
            <!-- Previous page link -->
            <?php if (isset($this->previous)): ?>
            <li class="previous"><a href="<?php echo $this->url(array('page' => $this->previous, 'q' => My_Utils::getRequestParam('q'))); ?>">«</a></li>
            <?php else: ?>
                <li class="previous disabled"><span>«</span></li>
            <?php endif; ?>

            <!-- Numbered page links -->
            <?php foreach ($this->pagesInRange as $page): ?>
                <?php if ($page != $this->current): ?>
                    <li class="">
                        <a class="page" href="<?php echo $this->url(array('page' => $page, 'q' => My_Utils::getRequestParam('q'))); ?>"><?php echo $page; ?></a>
                    </li>
                <?php else: ?>
                    <li class="page active">
                        <span><?php echo $page; ?></span>
                    </li>
                <?php endif; ?>
            <?php endforeach; ?>

            <!-- Next page link -->
            <?php if (isset($this->next)): ?>
                <li class="next">
                    <a class="next" href="<?php echo $this->url(array('page' => $this->next, 'q' => My_Utils::getRequestParam('q'))); ?>">»</a>
                </li>
            <?php else: ?>
                <li class="next disabled"><span>»</span></li>
            <?php endif; ?>
        </ul>
    </div>
<?php endif; ?>